package com.training.java.core.inheritance;

public class PolymorphysmDemo {

	public static void main(String[] args) {
		// constructor
		
		Player cricketPlayer = new CricketPlayers("Satish", 11, "IDLE");
		
		Player chessPlayer = new ChessPlayer("Satish", 2, "IDLE");
		
		//player.start();
		//player.stop();
				
		//System.out.println(" player started playing"+  player.isStarted());
		
		execute(cricketPlayer);
		execute(chessPlayer);
		
	// execute method.
	}

	public   static void execute(Player player)
	
	{
		player.start();
		player.stop();
		System.out.println(" player started playing"+ player.isStarted());
	}
	
}